﻿

public static class DataHelper
{
    static SaveComponent saveComponent;
    public static void InitializePath(string path)
    {
        saveComponent = new SaveComponent(path);
    }

    public static bool HasKey(string key)
    {
        return saveComponent.HasKey(key);
    }

    public static void DeleteKey(string key)
    {
         saveComponent.DeleteKey(key);
    }

    public static void DeleteAll()
    {
        saveComponent.DeleteAll();
    }

    public static void SaveAll()
    {
        saveComponent.SaveAll();
    }

    public static void SetInt(string key, int value)
    {
        saveComponent.SetInt(key, value);
    }
    public static void SetFloat(string key, float value)
    {
        saveComponent.SetFloat(key, value);
    }
    public static void SetString(string key, string value)
    {
        saveComponent.SetString(key, value);
    }

    public static int GetInt(string key, int defaultValue = 0)
    {
        return saveComponent.GetInt(key, defaultValue);
    }
    public static float GetFloat(string key, float defaultValue = 0f)
    {
        return saveComponent.GetFloat(key, defaultValue);
    }
    public static string GetString(string key, string defaultValue = "")
    {
        return saveComponent.GetString(key, defaultValue);
    }
}
